bugfixes and add common module