fixed compilation errors & selection tests