Fixed range checking for startframe, endframe.