(hopefully) final bugfix to A*