Fixed broken functionality