Better version of previous fix