fixed linux bug for ptr loading
added a simple test