fixed bugs in lwrp