Some small fixes after code was analysed