fixed bugs in rectangular morphology case