fixing lwes issues and optimizing configuration