fixed bug when using short id and added debug messages