fixed missing includes and pragma definition