Minor fixes, still won't compile due to memory error

Signed-off-by: David Silver <dms.silver@gmail.com>