Fixing minor variable bug