Fixes memory fault