Fixed getDep

Added error detection and bypass.