fixes for nOfElements plus project-specific work
hope this works...