Fixed: sound problems + small optimization in the warn function