fixed bugs in interfac creation