int to pointer bug in random background fix attempt 1