Removed bad logic