Fixing a bug in the previous fix