Finally fixed the problem. Fucking floating point promotion