fixed bug in intensity measurement