Fix queen null pointer bug