Fixing code warnings