Attempt at fixing #342