bug fix when multiple buttons pressed consequtively