fixes and make it compile