Remerge with changes from zelgerj