Added support to limit frame rate