fixed pointer bug in linux