fixed some nasty bug