Fix shadowing order for primitives, make notify earlier

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>