fixed bugs, as reported by wraithguard01