Fixed  #53, #56 and #57