previous fix was a hack. reverting