weird bug when compiling on ubuntu