Fix has_deafult error, fixes #17