Fixed faulty code.