fixed float int casting issues