cleaned up debug statements.
fix recursion bug, added fallback if marked not available