Fix configuration errors and added tests to verify