quick and dirty bugfix for previous two commits