Incorporated the bugfix from master