bugfix for nullpointer exception in getTap

bugfix for nullpointer exception in getTap