Issues #459 , #500, #502 fixed