Fixed testing code