Fixed issue with wrong context for dialog