bugfix thanks to Gwen