Attempt at fixing #514