fixed merge problems in previous branch