more console logs; fix modal bug