Cloned from version 0.1.7