fix several features/issues