More bug fixing attempts

Keep on keeping on.