Better implementation of previous commit (7ce49fc2b28bcfd7d455f43e431987a380fae3c4)