Fixed stupid calculation bug