several issues fixed