Fix nasty bug