Fixing a minor bug which was causing a warning