fixed memory error in test app