Chnage dynamically the tooltip position if the tooltip will not be visible

Fix issue #54