Fixed #55, fixed #56, thanks @zenoli