added principal correction as current_user has some bug