Fixes #47, this validates the frame number is valid before taking action and more special frames.

Fixes #47, this validates the frame number is valid before taking action and more special frames.