Changes: force frame.duration to integer, remove frame.to test code