Second attempt at fixing #484