bugs fix due to last commit

Fix bugs in Input and FPS function due to last commit