cleaning up pointer to prevent segfault :O