Fixed errors #17 and #21