fixing selfmade bugs