Fix bug and bump to 0.5.0