#158 fixed. also issue with read memory permission fixed