Small bug due to copying code