small fix (floor ceil) and 512