Fix previous commit with better solution