Printing

Some issue fixes done in the test app related to printing generic. Changes done in 2 files. Please look into it and merge to master.