Fix to be more generic