Edited code so there weren't any other warnings