Sometimes it doesn't work for me in IDE mode, but when I compile the program it works fine.