Fixed propcore crash bugs.
Fixed while loops!