Fixed floating point in margin bug and zero movs bug