partially revert code merged #481, brreaks old qt versions