LPS-44246 and LPS-44090

Hey Hugo,

Here are both of those fixes in one pull. Let me know if you have any questions.

Thanks.