resolved bug #56, #57, #58, #61