small fixes and improvements according to @Kondou-ger comments