Restoring previous fixes that were lost during one of the last commits in this class...