fixed few small bugs that prevented compilation