Fixed some issues resulting in compile error