Reverted back to old logic, will improve later...