fixed background calculation