Fix #1. Props Paul Gibbs