library: second_window fix for modulo float errors