Implemented last changes from master