Attempt at some fixes