minor fixes, still needs expression checking