fixed catch, and moved ActivityDao code to Activity