Bug fix by initialising pointers.