fixed performance issue (i hope...)