Merge in looztra's changes