Fix wrong variable in check for profiles