solved compilation problems due to minor bugs