fix input clearing when enter pressed