LPS-42294

Hey Kim,

Can you please review and retest my changes? I did some modifications to your code and I explained it in the different commits. 

If you disagree with something or you see any issue with my changes please let me know or send me a new pull with the modifications. If everything seems good to you, please send it to BChan.

Thanks

cc/ @samuelkong