Fix bugs

Ok Travis, you win..