Hopefully will prevent some future bugs.