Removed if statement referencing non-existent variable