bug fixing after merge