Fixing anoying bug