Fix creating of instance of FlashMessages service