Applied a bugfix from my local branch