remove sizeof and then bug fixes