Fixed some warnings/compile errors