fixed up Xoppa's PR as discussed on IRC