fixed build and removed all warnings