improved on previous fix