Daniel's fix