Fixed code accordingly.