fix invalid access