Fixing minor bug causing a warning